import { $demoi18n } from '@/utils/lang.js';
import { generateRules, generateUrlRule, genRequireRule } from '@/utils/rules';

export default {
  title: generateRules({
    required: false,
    label: $demoi18n('panel.label.title'),
  }),
  placeholder: generateRules({
    required: false,
    label: $demoi18n('label.promptInformation'),
  }),
  unit: generateRules({
    required: false,
    label: $demoi18n('panel.label.unit'),
  }),
  defaultVal: generateRules({
    required: false,
    label: $demoi18n('word.defaultValue'),
  }),
  xAxisName: generateRules({
    required: false,
    label: $demoi18n('label.horizontalAxisName'),
  }),
  yAxisName: generateRules({
    required: false,
    label: $demoi18n('label.verticalAxisName'),
  }),
  y0AxisName: generateRules({
    required: false,
    label: $demoi18n('label.leftAxisName'),
  }),
  y1AxisName: generateRules({
    required: false,
    label: $demoi18n('label.rightAxisName'),
  }),
  y0LegendName: generateRules({
    required: false,
    label: $demoi18n('panelProperty.label.y1Legend'),
  }),
  y1LegendName: generateRules({
    required: false,
    label: $demoi18n('panelProperty.label.y2Legend'),
  }),
  jumpText: generateRules({
    required: false,
    max: 500,
  }),
  lineType: genRequireRule({
    label: $demoi18n('lebel.brokenLineType'),
  }),
  hasIcon: genRequireRule({
    label: $demoi18n('panel.th.icon'),
  }),
  textComposition: genRequireRule({
    label: $demoi18n('label.typesetting'),
  }),
  displayStyle: genRequireRule({
    label: $demoi18n('panelProperty.label.componentStyle'),
  }),
  alignment: genRequireRule({
    label: $demoi18n('panel.label.alignment'),
  }),
  siteId: genRequireRule({
    label: $demoi18n('word.site'),
  }),
  directoryId: genRequireRule({
    label: $demoi18n('word.catalog'),
  }),
  pageId: genRequireRule({
    label: $demoi18n('word.page'),
  }),
  backgroundType: genRequireRule({
    label: $demoi18n('word.background'),
  }),
  layoutZN: genRequireRule({
    label: $demoi18n('panel.label.arrangement'),
  }),
  tabsPosition: genRequireRule({
    label: $demoi18n('panel.label.tabPosition'),
  }),
  'titleStyle.aligns': genRequireRule({
    label: $demoi18n('panel.label.alignment'),
  }),
  'lineStyle.aligns': genRequireRule({
    label: $demoi18n('panel.label.alignment'),
  }),
  layoutDirection: genRequireRule({
    label: $demoi18n('panel.label.componentOrientation'),
  }),
  multiSortBy: genRequireRule({
    label: $demoi18n('panel.label.sort'),
  }),

  bodyWidthPercent: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.piePercent'),
  }),
  totalDecimalCount: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.totalDecimal'),
  }),
  barNum: genRequireRule({
    type: 'number',
    label: $demoi18n('label.xAxisGroupCount'),
  }),
  barWidth: genRequireRule({
    type: 'number',
    label: $demoi18n('label.BarWith'),
  }),
  labelQuantity: genRequireRule({
    type: 'number',
    label: $demoi18n('TOP'),
  }),
  yAxisNameLeft: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.labelDistance'),
  }),
  chartPadding: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.chartSpacing'),
  }),
  'echart.yAxis.splitNumber': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.yAxisSplitNumber'),
  }),
  'echart.series.label.fontSize': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.barLabelSize'),
  }),
  'padding.top': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.topAxisMargin'),
  }),
  'padding.left': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.leftAxisMargin'),
  }),
  'padding.bottom': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.bottomAxisMargin'),
  }),
  'padding.right': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.rightAxisMargin'),
  }),
  'series.top': genRequireRule({
    type: 'number',
    label: $demoi18n('relationship.label.topDistance'),
  }),
  'series.bottom': genRequireRule({
    type: 'number',
    label: $demoi18n('relationship.label.bottomDistance'),
  }),
  'series.left': genRequireRule({
    type: 'number',
    label: $demoi18n('relationship.label.leftDistance'),
  }),
  'series.right': genRequireRule({
    type: 'number',
    label: $demoi18n('relationship.label.rightDistance'),
  }),
  'itemTitle.fontSize': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.fontSize'),
  }),
  'itemTitle.imgSize': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.iconSize'),
  }),
  'itemData.fontSizeValue': genRequireRule({
    type: 'number',
    label: $demoi18n('label.fontSize.value'),
  }),
  'itemData.fontSizeUnit': genRequireRule({
    type: 'number',
    label: $demoi18n('label.fontSize.nameUnit'),
  }),
  'itemData.imgSize': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.iconSize'),
  }),
  rotate: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.labelRotation'),
  }),
  levelNum: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.regionalLevel'),
  }),
  fontSize: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.fontSize'),
  }),
  'titleStyle.fontSize': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.fontSize'),
  }),
  'lineStyle.fontSize': genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.fontSize'),
  }),
  nameWidth: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.lable.leftWidth'),
  }),
  valueWidth: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.lable.rightWidth'),
  }),
  xLabelRotate: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.labelAngle'),
  }),
  fontSizeName: genRequireRule({
    type: 'number',
    label: $demoi18n('label.fontSize.name'),
  }),
  fontSizeValue: genRequireRule({
    type: 'number',
    label: $demoi18n('label.fontSize.value'),
  }),
  fontSizeUnit: genRequireRule({
    type: 'number',
    label: $demoi18n('label.fontSize.unit'),
  }),
  imgSize: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.imgSize'),
  }),
  groupImgSize: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.groupImgSize'),
  }),

  ringThickness: genRequireRule({
    type: 'number',
    label: $demoi18n('label.ringThickness'),
  }),
  ringRadius: genRequireRule({
    type: 'number',
    label: $demoi18n('label.ringRadius'),
  }),
  chartSize: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.chartSize'),
  }),
  leftPercent: genRequireRule({
    type: 'number',
    label: $demoi18n('label.chartPercent'),
  }),
  centerPercent: genRequireRule({
    type: 'number',
    label: $demoi18n('label.legendPercent'),
  }),
  rightPercent: genRequireRule({
    type: 'number',
    label: $demoi18n('label.indexPercent'),
  }),
  marginLeft: genRequireRule({
    type: 'number',
    label: $demoi18n('label.legendLeftMargin'),
  }),
  timeWidth: genRequireRule({
    type: 'number',
    label: $demoi18n('dataRange.label.componentWidth'),
  }),
  width: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.inputBoxWidth'),
  }),
  opacity: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.opacityPercent'),
  }),
  paddingTop: genRequireRule({
    type: 'number',
    label: $demoi18n('word.paddingTop'),
  }),
  paddingBottom: genRequireRule({
    type: 'number',
    label: $demoi18n('word.paddingDown'),
  }),
  paddingLeft: genRequireRule({
    type: 'number',
    label: $demoi18n('word.paddingLeft'),
  }),
  showThousand: genRequireRule({
    type: 'boolean',
    label: $demoi18n('word.showThousand'),
  }),
  paddingRight: genRequireRule({
    type: 'number',
    label: $demoi18n('word.paddingRight'),
  }),
  tabPadding: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.titleBottomMargin'),
  }),
  stepVal: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.dragAccuracy'),
  }),
  carouseStepVal: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.rotationAccuracy'),
  }),
  carouselTime: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.laebl.carouselInterval'),
  }),
  symbolSizeMax: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.maxScatter'),
  }),
  symbolSizeMin: genRequireRule({
    type: 'number',
    label: $demoi18n('panel.label.minScatter'),
  }),

  timeType: generateRules({
    label: $demoi18n('word.timeFormat'),
  }),
  defaultValue: generateRules({
    label: $demoi18n('word.defaultValue'),
  }),
  componentStyle: generateRules({
    label: $demoi18n('panel.label.componentStyle'),
  }),
  'colors.tabBgColorOn': genRequireRule({
    label: $demoi18n('panel.label.activeColor'),
  }),
  'colors.tabBgColor': genRequireRule({
    label: $demoi18n('panel.label.unactiveColor'),
  }),
  backgroundColor: genRequireRule({
    label: $demoi18n('word.backgroundColor'),
  }),

  jumpUrl: generateUrlRule(),
};
